<%@ page language="java" import="java.util.*,java.text.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>广东省传播平台-合同录入页</title>
		<style>
		#organizesTree {
			margin-top: 10px;
			border: 1px solid #617775;
			background: #f0f6e4;
			min-width: 180px;
			max-height: 400px;
			overflow-y: scroll;
			overflow-x: auto;
		}
		</style>
		<link rel="stylesheet" type="text/css" href="<%=path%>/css/common.css" />
		<link rel="stylesheet" type="text/css" href="<%=path%>/css/tag.css" />
		<script type="text/javascript" src="<%=path%>/js/jquery-1.7.2.js">
		</script>
        <script type="text/javascript" src="<%=path%>/js/My97DatePicker/WdatePicker.js">
        </script>
		<link rel="stylesheet" type="text/css" 
		    href="<%=path%>/js/My97DatePicker/skin/WdatePicker.css"/>
		    		<link rel="stylesheet" type="text/css" href="<%=path%>/css/common.css" />
		<link rel="stylesheet" type="text/css" href="<%=path%>/css/tag.css" />
		<link href="<%=path%>/js/My97DatePicker/skin/WdatePicker.css"
			rel="stylesheet" type="text/css" />
		<link type="text/css" rel="stylesheet" href="<%=path%>/css/zTreeStyle/zTreeStyle.css" />	
		<link type="text/css" href="<%=path%>/js/jquery-ui-1.8.21.custom/css/smoothness/jquery-ui-1.8.21.custom.css" rel="stylesheet" />
		<script type="text/javascript" src="<%=path%>/js/jquery-1.7.2.js"></script>
		<script type="text/javascript" src="<%=path%>/js/jquery.ztree.core-3.1.js"></script>
		<script type="text/javascript" src="<%=path%>/js/jquery.ztree.excheck-3.1.min.js"></script>
		<script type="text/javascript" src="<%=path%>/js/jquery-ui-1.8.21.custom/js/jquery-ui-1.8.21.custom.min.js">
		</script>
		<script type="text/javascript">
			$(document).ready(function(){
				//
				$("#save").click(function(){
					 $('#form1').submit();
				});
				//
				$("#cancle").click(function(){
					if(confirm("您确认取消本次操作？"))
					{
						window.location.href='getUnits.action';
					}
				});
	        });
		</script>
	</head>

	<body>
	<jsp:include page="../common/top.jsp"></jsp:include>


		<!-- 顶部start -->
		<div id="main">
			<div class="body">
				<!-- 导航菜单 -->
				<jsp:include page="../common/nav.jsp"></jsp:include>
				<!-- 主体 -->
				<div class="main_body">
				<form id="form1" method="post" action="addUnit.action">
					<div id="add_div">
						<table class="table_add" style="width: 100%;" >
							<tr>
								<th style="width: 150px;">
									部件编号：
								</th>
								<td style="width: 225px;">
									<input type="text" class="text" name="unit.unitID" style="width: 225px;" />
								</td>
								<th style="width: 189px;">
									部件名称：
								</th>
								<td>
									<input type="text" class="text" name="unit.unitName" style="width: 225px;" />
								</td>
							</tr>
							<tr>
								<th style="width: 150px;">
									设备：
								</th>
								<td style="width: 225px;">
									<s:select name="unit.deviceID" list="#{1:'设备1',2:'设备2'}" listKey="key" listValue="value" headerKey="0" headerValue="--请选择--"></s:select>
								</td>
								<th style="width: 189px;">
									部件类型：
								</th>
								<td>
									<s:select name="unit.unitType" list="#{1:'部件类型1',2:'部件类型2'}" listKey="key" listValue="value" headerKey="0" headerValue="--请选择--"></s:select>
								</td>
							</tr>
							<tr>
								<th style="width: 150px;">
									安装人：
								</th>
								<td style="width: 225px;">
									<input type="text" class="text" name="unit.fixMan" style="width: 225px;" />
								</td>
								<th style="width: 189px;">
									安装时间：
								</th>
								<td>
									<input type="text" class="text Wdate" name="unit.fixTime" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"  style="width: 225px;" />
								</td>
							</tr>
							<tr>
								<th style="width: 150px;">
									供应商：
								</th>
								<td style="width: 225px;">
									<input type="text" class="text" name="unit.supplier" style="width: 225px;" />
								</td>
								<th style="width: 189px;">
									购买日期：
								</th>
								<td>
									<input type="text" class="text Wdate" name="unit.purchaseDate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"  style="width: 225px;" />
								</td>
							</tr>
							<tr>
								<th style="width: 150px;">
									登记人：
								</th>
								<td style="width: 225px;">
									<input type="text" class="text" name="unit.registerMan" style="width: 225px;" />
								</td>
								<th style="width: 189px;">
									登记时间：
								</th>
								<td>
									<input type="text" class="text Wdate" name="unit.registerTime" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"  style="width: 225px;" />
								</td>
							</tr>
							<tr>
								<th style="width: 150px;">
									状态：
								</th>
								<td colspan="3">
									<s:select name="unit.status" list="#{1:'状态1',2:'状态2'}" listKey="key" listValue="value" headerKey="0" headerValue="--请选择--"></s:select>
								</td>
							</tr>
							<tr>
								<th style="width: 150px;">
									备注：
								</th>
								<td colspan="3">
									<textarea name="unit.comments" rows="5" cols="100"></textarea>
								</td>
							</tr>
						</table>
					</div>
					<div style="margin: 8px 0 0 150px;">
						<input type="button" class="btn-title" value="保存" id="save" />
						<input type="button" class="btn-title" value="取消" id="cancle" />
					</div>
				</form>
				</div>
			</div>
		</div>
		<div id="organizeContent" class="menuContent"
			style="display: none; position: absolute;">
			<ul id="organizesTree" class="ztree" style="margin-top: 0;"></ul>
		</div>
		<!-- 顶部end -->
		<!-- 底部start -->
		<div id="bottom">
			<div class="body">
				<label>
					版权所有&nbsp;&nbsp;&nbsp;&nbsp;2012东莞移动
				</label>
			</div>
		</div>
		<!-- 底部end -->
	</body>
</html>
